import request from '@/utils/request'
export default {
  //根据课程id获取章节和小姐数据列表
  getAllChapterVideo(courseId) {
    return request({
      url: `/eduservice/eduChapter/getChapterVideo/${courseId}`,
      method: 'get'
    })
  },

  //添加章节
  addChapter(chapter) {
    return request({
      url: `/eduservice/eduChapter/addChapter`,
      method: 'post',
      data:chapter
    })
  },

  //根据id查询章节
  getChapter(chapterId) {
    return request({
      url: `/eduservice/eduChapter/getChapterInfo/${chapterId}`,
      method: 'get'
    })
  },

  //修改章节
  updateChapter(chapter) {
    return request({
      url: `/eduservice/eduChapter/updateChapter`,
      method: 'post',
      data:chapter

    })
  },

  //删除章节
  delecteChapter(chapterId) {
    return request({
      url: `/eduservice/eduChapter/${chapterId}`,
      method: 'delete'
    })
  }

}
